]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
jhbuild wrapper: don't try to "restore GNOME"
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 12 Apr 2012 17:51:40 +0000 (19:51 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 24 Apr 2012 19:20:49 +0000 (21:20 +0200)
If run under jhbuild, gnome-shell is in PATH, so trying to restore
is just running it again, likely failing in the same way (with the
additional problem of detaching the shell from the terminal). Also,
this is using deprecated GConf keys, and deprecated pygobject
bindings.

src/gnome-shell-jhbuild.in

index 6d1a7a7a63ae466105767135c7777ba4ec2bcbb5..d2f2e545c68b90acf05a9b6adaf48388720d3bdc 100755 (executable)
@@ -163,48 +163,6 @@ def run_shell():
 
     return normal_exit
 
-
-def restore_gnome():
-    # Do imports lazily to save time and memory
-    import gio
-    import gconf
-
-    # We don't want to start the new gnome-panel in the current
-    # directory; $HOME is better for stuff launched from it
-    os.chdir(os.path.expanduser("~"))
-
-    def launch_component(gconf_path):
-        client = gconf.client_get_default()
-        component = client.get_string(gconf_path)
-
-        if component == None or component == "":
-            return False
-
-        # See gnome-session/gsm-util.c:gsm_util_find_desktop_file_for_app_name()
-        # The one difference is that we don't search the autostart directories,
-        # and just search normal application search path. (Gio doesnt' know
-        # how to search the autostart dirs, so we'd have to do that ourselves.)
-        appinfo = None
-        try:
-            appinfo = gio.unix.DesktopAppInfo(component + ".desktop")
-        except:
-            try:
-                appinfo = gio.unix.DesktopAppInfo("gnome-" + component + ".desktop")
-            except:
-                pass
-
-        if appinfo:
-            appinfo.launch()
-            return True
-        return False
-
-    # GNOME2 fallback
-    wm    = launch_component("/desktop/gnome/session/required_components/windowmanager")
-    panel = launch_component("/desktop/gnome/session/required_components/panel")
-
-    if not wm and not panel: # Probably GNOME3
-        subprocess.Popen(['gnome-shell'])
-
 # Main program
 
 parser = optparse.OptionParser()
@@ -235,17 +193,7 @@ if options.debug_command:
 elif options.debug:
     options.debug_command = "gdb --args"
 
-# We only respawn the previous environment on abnormal exit;
-# for a clean exit, we assume that gnome-shell was replaced with
-# something else.
-normal_exit = False
-
-try:
-    normal_exit = run_shell()
-finally:
-    if options.replace and not normal_exit:
-        restore_gnome()
-
+normal_exit = run_shell()
 if normal_exit:
     sys.exit(0)
 else: